package com.dy.spring.boot.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author dengyy
 */
@Api(tags="mySwagger")
@RestController
public class MyController {
//    @Resource
//    private RmqClient rmqClient;

//    @GetMapping("/hello")
//    public String hello(@RequestParam(value = "name", defaultValue = "World") String name) throws Exception {
//        rmqClient.sendUTF("tp1", "testTag", "哈哈哈1", "邓洋测试中");
//        rmqClient.sendUTF("tp3", "testTag", "哈哈哈3", "邓洋测试中");
//        rmqClient.sendUTF("tp4", "testTag", "哈哈哈4", "邓洋测试中");
//        return String.format("Hello %s!", name);
//    }

    @ApiOperation("测试name")
    @GetMapping("/getName")
    public String testSwagger(@RequestParam(value = "name", defaultValue = "World") String name){
        return name;
    }
}
